package com.dingreading.cloud.subject.service.impl;

import com.dingreading.cloud.subject.entity.CourseTrainFile;
import com.dingreading.cloud.subject.entity.table.CourseTrainFileTableDef;
import com.dingreading.cloud.subject.mapper.CourseTrainFileMapper;
import com.dingreading.cloud.subject.service.CourseTrainFileService;
import org.springframework.stereotype.Service;

/**
 * 叮叮线下培训课程文件表 服务层实现。
 *
 * @author EDY
 * @since 2025-11-18
 */
@Service
public class CourseTrainFileServiceImpl extends BaseServiceImpl<CourseTrainFileMapper, CourseTrainFile, CourseTrainFileTableDef> implements CourseTrainFileService {

    @Override
    protected CourseTrainFileTableDef getTable() {
        return CourseTrainFileTableDef.courseTrainFile;
    }

    @Override
    public CourseTrainFile getByUid(String fileUid) {
        return getMapper().selectOneByCondition(table.uid.eq(fileUid));
    }
}
